﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using GSLMS.Entity;

namespace GSLMS.WebAPP.Areas.DianDang.Controllers.Default
{
    public class DefaultController : AdminBaseController
    {
        //
        // GET: /DianDang/Main/

        public ActionResult Index()
        {
            ViewData["ScrollTips"] = new List<ScrollTip>();
            ViewData["Agendas"] = new List<Agenda>();

            return View();
        }
        public ActionResult RegInfos(FormCollection collection)
        {
            var custName = Request["CUSTNAME"];
            var searchParm = new GSLMS.Entity.TB_APP_REGINFO() { CUSTNAME = custName };
            base.SearchPara<TB_APP_REGINFO>(collection, searchParm);
            searchParm.CUSTNAME = custName;
            var reglist = serviceRegInfo.GetList(searchParm);
            ViewData["RowCount"] = searchParm.RowCount;
            return View(reglist);           
        }
        //
        // GET: /DianDang/Main/Details/5

        public ActionResult Details(int id)
        {
            return View();
        }

        //
        // GET: /DianDang/Main/Create

        public ActionResult Create()
        {
            return View();
        }

        //
        // POST: /DianDang/Main/Create

        [HttpPost]
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                // TODO: Add insert logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }

        //
        // GET: /DianDang/Main/Edit/5

        public ActionResult Edit(int id)
        {
            return View();
        }

        //
        // POST: /DianDang/Main/Edit/5

        [HttpPost]
        public ActionResult Edit(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add update logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }

        //
        // GET: /DianDang/Main/Delete/5

        public ActionResult Delete(int id)
        {
            return View();
        }

        //
        // POST: /DianDang/Main/Delete/5

        [HttpPost]
        public ActionResult Delete(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add delete logic here

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
    }
}
